/*
 * Assume you have a method isSubstring which checks if one word is a substring of another.
 * Given two strings, s1 and s2, write code to check if s2 is a rotation of s1 using only one call 
 * to isSubString.(i.e. "waterbottle" is a rotation of "erbottlewat");
 */
public class Chapter1_8 {
	
	public boolean isRotateStr(String str1, String str2)
	{
		String newStr2 = str2 + str2;
		if(newStr2.contains(str1) && (str2.length() == str1.length()))
			return true;
		return false;
	}
}
